<%-- 
    Document   : guestIndex
    Created on : Oct 8, 2012, 9:58:53 PM
    Author     : Nhan
--%>

<%@page import="com.Checker, com.User" contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
        <% 
            session = request.getSession();
            User curUser = (User)session.getAttribute("currentUser");
            String role = curUser.getRole().trim();

            if(!role.equalsIgnoreCase("guest")) {
                out.println("<h1>This page is only support for guest!<h1>");
            } else {
                %>
                <h3>Welcome: <%= curUser.getFirstName() %> </h3>
                <p>Please choose your action:</p>
                <ol>
                    <li><a href="../centralUnit?action=getSearch">Search Products</a></li>
                </ol>
           <% }
        %>
    </body>
</html>
